<extend name="work/baseuser"/>
<block name="content">

    <div class="case-content ">
        <div class="news-flow">
            <div class="layui-fluid pb50">
                <form class="layui-form" action="">
                    <div class="layui-form-item">
                        <label class="layui-form-label">公司名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="company" value="{$info.company|default=''}" lay-verify="required"
                                   placeholder="真实公司名称" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">信用代码</label>
                        <div class="layui-input-block">
                            <input type="text" name="tax" value="{$info.tax|default=''}" lay-verify="required"
                                   placeholder="企业18位统一社会信用代码" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">收件人</label>
                        <div class="layui-input-block">
                            <input type="text" name="inname" value="{$info.inname|default=''}" placeholder="收件人姓名"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">收件电话</label>
                        <div class="layui-input-block">
                            <input type="text" name="inmobile" value="{$info.inmobile|default=''}" placeholder="收件人手机号码"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">收件地址</label>
                        <div class="layui-input-block">
                            <input type="text" name="address" value="{$info.address|default=''}" placeholder="详细地址"
                                   autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <input type="hidden" name="id" value="{$info.id|default=''}">
                    <blockquote class="layui-elem-quote layui-quote-nm">
                        信息将用于开具体增值税普通发票<br>
                        因为填写信息错误发票将发票不能进行退换<br>
                    </blockquote>

                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="saveedit">保存修改</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>


        </div>

    </div>

    <!-- end case-content -->
</block>
<block name="script">

    <script type="text/javascript">
        layui.use(['form','carousel', 'jquery', 'element', 'table', 'layer'], function () {
            var carousel = layui.carousel
                , element = layui.element
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , $ = layui.$;

            form.on('submit(saveedit)', function (data) {
                // layer.msg(JSON.stringify(data.field));
                $.ajax({
                    url: "{:url('/home/homeuser/checking')}",
                    type: 'post',
                    dataType: 'json',
                    data: data.field
                })
                    .done(function (res) {
                        if (res.code) {
                            layer.msg(res.msg, {
                                closeBtn: 0
                                , icon: 1
                            });
                        }else{
                            layer.msg(res.msg, {
                                time: 1500,
                                icon: 5
                            });
                        }
                    })
                    .fail(function () {
                        layer.msg('服务器异常,请稍后再试', {
                            time: 1500,
                            icon: 5
                        });
                    })
                    .always(function () {

                    });
                return false;
            });
            $('.app-header-menuicon').on('click', function () {
                $('.header-down-nav').toggleClass('down-nav')
            })

        });
    </script>
</block>